-
Notifications
You must be signed in to change notification settings - Fork 1
Additional Tests #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional Tests #13
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds new tests to improve coverage for numeric, miscellaneous, IO, debugging, and communication functionalities while also refining underlying MAD interface methods.
- New tests to validate numeric types, miscellaneous types, IO and loading, debugging, and communication
- Updates to the MAD-NG Python API including improved iter, eval signature and enhanced repr documentation
- A fix ensuring the signal handler is only set in the main thread
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_numeric_types.py | Adds tests for numeric and complex number send/receive functionality |
| tests/test_misc_types.py | Introduces tests for nil values, ranges, monomials, and TPSA functionalities |
| tests/test_io_and_loading.py | Adds tests for file loading, global variable management, and MAD file execution |
| tests/test_debug.py | Includes tests for log file output and error routing in debug mode |
| tests/test_communication.py | Adds threading and string transmission tests along with signal handler verifications |
| src/pymadng/madp_pymad.py | Refines signal handler setup to only run on the main thread |
| src/pymadng/madp_object.py | Updates the eval function signature and accompanying documentation |
| src/pymadng/madp_classes.py | Improves iter safety with a sequence-check and updates repr and eq documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces additional tests for numeric, miscellaneous, I/O, communication, and debug functionalities; it refactors some functions for clarity and safety; and it updates documentation and internal methods.
- New tests are added for numeric types, misc types (including tpsa and damap), I/O operations, debug logging, and communication (including multithreading compatibility).
- Improvements include a safer iter implementation, better documentation and repr formatting in MAD objects, and a refined signal handler setup in the MAD process.
- Minor documentation formatting fixes are applied to the architecture docs.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_numeric_types.py | Introduces tests for numeric types send/recv functionality |
| tests/test_misc_types.py | Adds tests for miscellaneous types including nil, rng, mono, and tpsa tests |
| tests/test_io_and_loading.py | Introduces tests for file I/O, loading MAD modules, and global variable handling |
| tests/test_debug.py | Adds tests for debug logging and error handling in MAD |
| tests/test_communication.py | Provides new tests for communication methods and multithreading aspects |
| src/pymadng/madp_pymad.py | Updates signal handling to conditionally set handlers for main thread |
| src/pymadng/madp_object.py | Refines the eval method parameter naming from “input” to “expression” |
| src/pymadng/madp_classes.py | Improves repr and adds type hints; updates iter implementation |
| docs/source/architecture.md | Adds a minor formatting fix |
Comments suppressed due to low confidence (1)
src/pymadng/madp_classes.py:192
- Consider quoting 'sequence' in the is_instanceOf call (e.g. use 'is_instanceOf("sequence")') to ensure it is interpreted as a string literal.
self._mad.send(f"{self._mad.py_name}:send({self._name}:is_instanceOf(sequence))")
Uh oh!
There was an error while loading. Please reload this page.